<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>富文本测试</title>
<style type="text/css">
#connect-container {
	float: left;
	width: 400px
}

#connect-container div {
	padding: 5px;
}

#console-container {
	float: left;
	margin-left: 15px;
	width: 400px;
}

#console {
	border: 1px solid #CCCCCC;
	border-right-color: #999999;
	border-bottom-color: #999999;
	height: 170px;
	overflow-y: scroll;
	padding: 5px;
	width: 100%;
}

#console p {
	padding: 0;
	margin: 0;
}
</style>

<script src="http://cdn.sockjs.org/sockjs-0.3.min.js"></script>

<script type="text/javascript">
	 
</script>
</head>
<body>

	 <!-- 加载编辑器的容器 -->
    <script id="container" name="content" type="text/plain">
                                       这里写你的初始化内容
    </script>
    <!-- 配置文件 -->
    <script type="text/javascript" src="/dvmini/res/UE/ueditor.config.js"></script>
    <!-- 编辑器源码文件 -->
    <script type="text/javascript" src="/dvmini/res/UE/ueditor.all.js"></script>
    <!-- 实例化编辑器 -->
    <script type="text/javascript">
    
    UE.Editor.prototype._bkGetActionUrl = UE.Editor.prototype.getActionUrl;
    UE.Editor.prototype.getActionUrl = function(action) {
        if (action == 'uploadimage' || action == 'uploadscrawl' || action == 'uploadimage') {
            return '/dvmini/upload/NewUploadImg';
        } else {
            return this._bkGetActionUrl.call(this, action);
        }
    }
      //  var ue = UE.getEditor('container');
         //实例化加入参数
        var ue = UE.getEditor('container', {
            autoHeight: false
        });
        var ue = UE.getContent();
         //对编辑器的操作最好在编辑器ready之后再做
        ue.ready(function() {
          //设置编辑器的内容
          ue.setContent('hello');
          //获取html内容，返回: <p>hello</p>
          var html = ue.getContent();
          console.log("html:"+html);
          //获取纯文本内容，返回: hello
          var txt = ue.getContentTxt();
          console.log("text:"+txt);
      });
    </script>
</body>
</html>